package com.ruoyi.recipes.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * 菜谱主表对象 recipes
 * 
 * @author syy
 * @date 2025-08-13
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Recipes extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 作者ID */
    @Excel(name = "作者ID")
    private Long userId;

    /** 菜谱标题 */
    @Excel(name = "菜谱标题")
    private String title;

    /** 媒体类型：1-图片，2-视频 */
    @Excel(name = "媒体类型：1-图片，2-视频")
    private Integer mediaType;

    /** 封面资源URL */
    @Excel(name = "封面资源URL")
    private String coverUrl;

    /** 通用简介 */
    @Excel(name = "通用简介")
    private String introduction;

    /** 视频补充描述（仅视频） */
    @Excel(name = "视频补充描述", readConverterExp = "仅=视频")
    private String videoDescription;

    /** 视频时长（秒，仅media_type=2） */
    @Excel(name = "视频时长", readConverterExp = "秒=，仅media_type=2")
    private Integer videoDuration;

    /** 浏览量 */
    @Excel(name = "浏览量")
    private Long viewCount;

    /** 关联耗时表 */
    @Excel(name = "关联耗时表")
    private Integer cookTimeId;

    /** 关联难度表 */
    @Excel(name = "关联难度表")
    private Integer difficultyId;

    /** 关联分类表 */
    @Excel(name = "关联分类表")
    private Integer categoryId;

    /** 状态（0-正常，1-下架） */
    @Excel(name = "状态", readConverterExp = "0=-正常，1-下架")
    private Integer status;

    /** 收藏数 */
    @Excel(name = "收藏数")
    private Long collectCount;

    /** 是否删除：0正常 1删除 */
    private Integer del;

    private Users users;
    private CookTimeOptions cookTimeOptions;
    private DifficultyOptions difficultyOptions;
    private CategoryTop categoryTop;
    private Categories categories;
    private List<RecipeIngredients>  recipeIngredients;
    private List<RecipeSteps> recipeSteps;
    private List<RecipeSceneTags> recipeSceneTags;
    private SceneTags sceneTags;
    
    /** 评论列表 */
    private List<Comments> comments;

    /** 场景标签ID（用于查询） */
    private Long sceneTagId;
    /** 评论数量 */
    private Long commentCount;


}
